from django.db import models
from django.contrib.auth.models import User
from ossfilefield.field import OssFileField

class Attachment(models.Model):
    owner = models.ForeignKey(User, on_delete=models.CASCADE)
    title = models.CharField(default="title", max_length=255)
    content = models.CharField(default="content", max_length=255)
    file = models.TextField(default="file _path")
    oss_file = OssFileField(upload_to="page")

    def __str__(self):
        return self.title